package com.sky.mapper.admin;

import com.sky.annotation.AutoFill;
import com.sky.enumeration.OperationType;
import com.sky.pojo.Dish;
import com.sky.pojo.DishFlavor;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishMapper {
    @AutoFill(value = OperationType.INSERT)
    void addDish(Dish dish);

    void addDishFlavor(List<DishFlavor> flaovrs);

    List<DishVO> findByPage(String name, Integer categoryId, Integer status);

    void delete(List<Integer> ids);

    DishVO findById(Integer dishId);

    @AutoFill(value = OperationType.UPDATE)
    void update(Dish dish);

    void deleteDishFlavor(Long id);
}
